#include <cstdint>
#include <vector>

using namespace std;

class Solution {
public:
    vector<bool> kidsWithCandies(vector<int>& candies, int extraCandies) {
        vector<bool> ans(candies.size());
        int max_num = INT32_MIN;
        for (int i = 0; i < candies.size(); i++) {
            max_num = max(candies[i], max_num);
        }
        for (int i = 0; i < candies.size(); i++) {
            if (candies[i] + extraCandies >= max_num) {
                ans[i] = true;
            }
        }
        return ans;
    }
};